package core.datamodel;

import jade.content.onto.annotations.SuppressSlot;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Hashtable;

import core.api.performance.PerformanceDescription;


public class Element implements Serializable  {
	
	private long id;
	private long customerResourceId;
	private long externalId;
	private String name;
	private String type;
	private String value;
	ArrayList<ElementValue> accounts;

	private Usage usage;
	private PerformanceDescription performanceDescription = null;
	private long performanceDescriptionId;
	private boolean needPerformanceData;
	
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	public long getCustomerResourceId() {
		return customerResourceId;
	}
	public void setCustomerResourceId(long customerResourceId) {
		this.customerResourceId = customerResourceId;
	}
	public long getExternalId() {
		return externalId;
	}
	public void setExternalId(long externalId) {
		this.externalId = externalId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	@SuppressSlot
	public Usage getUsage() {
		return usage;
	}

	public void setUsage(Usage usage) {
		this.usage = usage;
	}
	
	@SuppressSlot
	public PerformanceDescription getPerformanceDescription() {
		return performanceDescription;
	}

	public void setPerformanceDescription(PerformanceDescription performanceDescription) {
		this.performanceDescription = performanceDescription;
		this.performanceDescriptionId = performanceDescription.getId();
	}
	

	@SuppressSlot
	public boolean isNeedPerformanceData() {
		return needPerformanceData;
	}

	public void setNeedPerformanceData(boolean needPerformanceData) {
		this.needPerformanceData = needPerformanceData;
	}

	public long getPerformanceDescriptionId() {
		return performanceDescriptionId;
	}

	public void setPerformanceDescriptionId(long performanceDescriptionId) {
		this.performanceDescriptionId = performanceDescriptionId;
		if (performanceDescription != null) performanceDescription.setId(performanceDescriptionId);
	}

	
	
	
	
	
	


	
}
